.class public Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;
.super Ljava/lang/Object;
.source "MP4Parser.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser$ParserException;
    }
.end annotation


# static fields
.field private static final m:I

.field private static final n:[I


# instance fields
.field private a:I

.field private b:I

.field private c:J

.field private d:I

.field private e:Les/e9;

.field private f:Les/e9;

.field private g:Ljava/util/Stack;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Stack<",
            "Les/c9$a$a;",
            ">;"
        }
    .end annotation
.end field

.field private h:Ljava/io/InputStream;

.field private i:J

.field private j:[Les/f9;

.field private k:Z

.field private l:Ljava/lang/StringBuilder;


# direct methods
.method static constructor <clinit>()V
    .locals 4

    const-string v0, "qt  "

    .line 1
    invoke-static {v0}, Les/g9;->a(Ljava/lang/String;)I

    move-result v1

    sput v1, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->m:I

    const/16 v1, 0x14

    new-array v1, v1, [I

    const-string v2, "isom"

    .line 2
    invoke-static {v2}, Les/g9;->a(Ljava/lang/String;)I

    move-result v2

    const/4 v3, 0x0

    aput v2, v1, v3

    const-string v2, "iso2"

    .line 3
    invoke-static {v2}, Les/g9;->a(Ljava/lang/String;)I

    move-result v2

    const/4 v3, 0x1

    aput v2, v1, v3

    const-string v2, "avc1"

    .line 4
    invoke-static {v2}, Les/g9;->a(Ljava/lang/String;)I

    move-result v2

    const/4 v3, 0x2

    aput v2, v1, v3

    const-string v2, "hvc1"

    .line 5
    invoke-static {v2}, Les/g9;->a(Ljava/lang/String;)I

    move-result v2

    const/4 v3, 0x3

    aput v2, v1, v3

    const-string v2, "hev1"

    .line 6
    invoke-static {v2}, Les/g9;->a(Ljava/lang/String;)I

    move-result v2

    const/4 v3, 0x4

    aput v2, v1, v3

    const-string v2, "mp41"

    .line 7
    invoke-static {v2}, Les/g9;->a(Ljava/lang/String;)I

    move-result v2

    const/4 v3, 0x5

    aput v2, v1, v3

    const-string v2, "mp42"

    .line 8
    invoke-static {v2}, Les/g9;->a(Ljava/lang/String;)I

    move-result v2

    const/4 v3, 0x6

    aput v2, v1, v3

    const-string v2, "3g2a"

    .line 9
    invoke-static {v2}, Les/g9;->a(Ljava/lang/String;)I

    move-result v2

    const/4 v3, 0x7

    aput v2, v1, v3

    const-string v2, "3g2b"

    .line 10
    invoke-static {v2}, Les/g9;->a(Ljava/lang/String;)I

    move-result v2

    const/16 v3, 0x8

    aput v2, v1, v3

    const-string v2, "3gr6"

    .line 11
    invoke-static {v2}, Les/g9;->a(Ljava/lang/String;)I

    move-result v2

    const/16 v3, 0x9

    aput v2, v1, v3

    const-string v2, "3gs6"

    .line 12
    invoke-static {v2}, Les/g9;->a(Ljava/lang/String;)I

    move-result v2

    const/16 v3, 0xa

    aput v2, v1, v3

    const-string v2, "3ge6"

    .line 13
    invoke-static {v2}, Les/g9;->a(Ljava/lang/String;)I

    move-result v2

    const/16 v3, 0xb

    aput v2, v1, v3

    const-string v2, "3gg6"

    .line 14
    invoke-static {v2}, Les/g9;->a(Ljava/lang/String;)I

    move-result v2

    const/16 v3, 0xc

    aput v2, v1, v3

    const-string v2, "M4V "

    .line 15
    invoke-static {v2}, Les/g9;->a(Ljava/lang/String;)I

    move-result v2

    const/16 v3, 0xd

    aput v2, v1, v3

    const-string v2, "M4A "

    .line 16
    invoke-static {v2}, Les/g9;->a(Ljava/lang/String;)I

    move-result v2

    const/16 v3, 0xe

    aput v2, v1, v3

    const-string v2, "f4v "

    .line 17
    invoke-static {v2}, Les/g9;->a(Ljava/lang/String;)I

    move-result v2

    const/16 v3, 0xf

    aput v2, v1, v3

    const-string v2, "kddi"

    .line 18
    invoke-static {v2}, Les/g9;->a(Ljava/lang/String;)I

    move-result v2

    const/16 v3, 0x10

    aput v2, v1, v3

    const-string v2, "M4VP"

    .line 19
    invoke-static {v2}, Les/g9;->a(Ljava/lang/String;)I

    move-result v2

    const/16 v3, 0x11

    aput v2, v1, v3

    .line 20
    invoke-static {v0}, Les/g9;->a(Ljava/lang/String;)I

    move-result v0

    const/16 v2, 0x12

    aput v0, v1, v2

    const-string v0, "MSNV"

    .line 21
    invoke-static {v0}, Les/g9;->a(Ljava/lang/String;)I

    move-result v0

    const/16 v2, 0x13

    aput v0, v1, v2

    sput-object v1, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->n:[I

    return-void
.end method

.method public constructor <init>()V
    .locals 2

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Les/e9;

    const/16 v1, 0x10

    invoke-direct {v0, v1}, Les/e9;-><init>(I)V

    iput-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->e:Les/e9;

    .line 3
    new-instance v0, Ljava/util/Stack;

    invoke-direct {v0}, Ljava/util/Stack;-><init>()V

    iput-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->g:Ljava/util/Stack;

    return-void
.end method

.method private a(J)V
    .locals 3

    const-wide/16 v0, -0x1

    cmp-long v2, p1, v0

    if-eqz v2, :cond_0

    .line 46
    iget-wide v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->i:J

    add-long/2addr v0, p1

    iput-wide v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->i:J

    :cond_0
    return-void
.end method

.method private a(Les/c9$a$a;)V
    .locals 14
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/NullPointerException;
        }
    .end annotation

    .line 23
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    const/4 v1, 0x0

    const-wide v2, 0x7fffffffffffffffL

    const/4 v4, 0x0

    .line 24
    :goto_0
    iget-object v5, p1, Les/c9$a$a;->f0:Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->size()I

    move-result v5

    if-ge v4, v5, :cond_8

    .line 25
    iget-object v5, p1, Les/c9$a$a;->f0:Ljava/util/List;

    invoke-interface {v5, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Les/c9$a$a;

    .line 26
    iget v6, v5, Les/c9$a;->a:I

    sget v7, Les/c9$a;->Y:I

    if-ne v6, v7, :cond_0

    .line 27
    invoke-static {v5}, Les/c9;->b(Les/c9$a$a;)Ljava/util/Map;

    goto :goto_1

    .line 28
    :cond_0
    sget v7, Les/c9$a;->v:I

    if-eq v6, v7, :cond_1

    goto :goto_1

    .line 29
    :cond_1
    sget v6, Les/c9$a;->u:I

    invoke-virtual {p1, v6}, Les/c9$a$a;->d(I)Les/c9$a$b;

    move-result-object v6

    iget-boolean v7, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->k:Z

    invoke-static {v5, v6, v7}, Les/c9;->a(Les/c9$a$a;Les/c9$a$b;Z)Les/f9;

    move-result-object v6

    if-nez v6, :cond_2

    goto :goto_1

    .line 30
    :cond_2
    sget v7, Les/c9$a;->w:I

    invoke-virtual {v5, v7}, Les/c9$a$a;->c(I)Les/c9$a$a;

    move-result-object v5

    if-eqz v5, :cond_7

    .line 31
    sget v7, Les/c9$a;->x:I

    invoke-virtual {v5, v7}, Les/c9$a$a;->c(I)Les/c9$a$a;

    move-result-object v5

    if-eqz v5, :cond_6

    .line 32
    sget v7, Les/c9$a;->y:I

    invoke-virtual {v5, v7}, Les/c9$a$a;->c(I)Les/c9$a$a;

    move-result-object v5

    .line 33
    invoke-static {v6, v5}, Les/c9;->a(Les/f9;Les/c9$a$a;)Les/f9$b;

    move-result-object v5

    .line 34
    iget v7, v5, Les/f9$b;->a:I

    if-nez v7, :cond_3

    goto :goto_1

    .line 35
    :cond_3
    iget-wide v7, v6, Les/f9;->d:J

    const-wide/16 v9, 0x0

    cmp-long v11, v7, v9

    if-lez v11, :cond_4

    .line 36
    iget-object v9, v6, Les/f9;->e:Les/f9$a;

    iget-wide v10, v5, Les/f9$b;->d:J

    const-wide/16 v12, 0x8

    mul-long v10, v10, v12

    const-wide/32 v12, 0xf4240

    mul-long v10, v10, v12

    div-long/2addr v10, v7

    long-to-int v7, v10

    iput v7, v9, Les/f9$a;->c:I

    .line 37
    :cond_4
    iput-object v5, v6, Les/f9;->h:Les/f9$b;

    .line 38
    invoke-interface {v0, v6}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 39
    iget-object v5, v5, Les/f9$b;->b:[J

    aget-wide v6, v5, v1

    cmp-long v5, v6, v2

    if-gez v5, :cond_5

    move-wide v2, v6

    :cond_5
    :goto_1
    add-int/lit8 v4, v4, 0x1

    goto :goto_0

    .line 40
    :cond_6
    new-instance p1, Ljava/lang/NullPointerException;

    const-string v0, "minfAtom is null"

    invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw p1

    .line 41
    :cond_7
    new-instance p1, Ljava/lang/NullPointerException;

    const-string v0, "mdiaAtom is null"

    invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw p1

    :cond_8
    new-array p1, v1, [Les/f9;

    .line 42
    invoke-interface {v0, p1}, Ljava/util/List;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;

    move-result-object p1

    check-cast p1, [Les/f9;

    iput-object p1, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->j:[Les/f9;

    return-void
.end method

.method private static a(I)Z
    .locals 6

    ushr-int/lit8 v0, p0, 0x8

    const-string v1, "3gp"

    .line 21
    invoke-static {v1}, Les/g9;->a(Ljava/lang/String;)I

    move-result v1

    const/4 v2, 0x1

    if-ne v0, v1, :cond_0

    return v2

    .line 22
    :cond_0
    sget-object v0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->n:[I

    array-length v1, v0

    const/4 v3, 0x0

    const/4 v4, 0x0

    :goto_0
    if-ge v4, v1, :cond_2

    aget v5, v0, v4

    if-ne v5, p0, :cond_1

    return v2

    :cond_1
    add-int/lit8 v4, v4, 0x1

    goto :goto_0

    :cond_2
    return v3
.end method

.method private a(Les/e9;)Z
    .locals 4

    const/16 v0, 0x8

    .line 11
    invoke-virtual {p1, v0}, Les/e9;->b(I)V

    .line 12
    invoke-virtual {p1}, Les/e9;->c()I

    move-result v0

    .line 13
    sget v1, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->m:I

    const/4 v2, 0x1

    if-ne v0, v1, :cond_0

    .line 14
    iput-boolean v2, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->k:Z

    return v2

    :cond_0
    const/4 v0, 0x4

    .line 15
    invoke-virtual {p1, v0}, Les/e9;->c(I)V

    const/4 v0, 0x0

    .line 16
    :cond_1
    :goto_0
    invoke-virtual {p1}, Les/e9;->a()I

    move-result v1

    if-lez v1, :cond_3

    .line 17
    invoke-virtual {p1}, Les/e9;->c()I

    move-result v1

    .line 18
    invoke-static {v1}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->a(I)Z

    move-result v3

    if-eqz v3, :cond_1

    .line 19
    sget v0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->m:I

    if-ne v1, v0, :cond_2

    .line 20
    iput-boolean v2, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->k:Z

    goto :goto_1

    :cond_2
    const/4 v0, 0x1

    goto :goto_0

    :cond_3
    move v2, v0

    :goto_1
    return v2
.end method

.method private a([BII)Z
    .locals 1

    .line 43
    :try_start_0
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->h:Ljava/io/InputStream;

    invoke-virtual {v0, p1, p2, p3}, Ljava/io/InputStream;->read([BII)I

    move-result p1

    const/4 p2, -0x1

    if-eq p1, p2, :cond_0

    int-to-long p1, p1

    .line 44
    invoke-direct {p0, p1, p2}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->a(J)V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    const/4 p1, 0x1

    return p1

    :catch_0
    move-exception p1

    .line 45
    invoke-virtual {p1}, Ljava/io/IOException;->printStackTrace()V

    :cond_0
    const/4 p1, 0x0

    return p1
.end method

.method private b()V
    .locals 1

    const/4 v0, 0x1

    .line 1
    iput v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->a:I

    const/4 v0, 0x0

    .line 2
    iput v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->d:I

    return-void
.end method

.method private b(J)V
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser$ParserException;
        }
    .end annotation

    .line 3
    :cond_0
    :goto_0
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->g:Ljava/util/Stack;

    invoke-virtual {v0}, Ljava/util/Stack;->isEmpty()Z

    move-result v0

    const/4 v1, 0x3

    if-nez v0, :cond_2

    iget-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->g:Ljava/util/Stack;

    invoke-virtual {v0}, Ljava/util/Stack;->peek()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Les/c9$a$a;

    iget-wide v2, v0, Les/c9$a$a;->d0:J

    cmp-long v0, v2, p1

    if-nez v0, :cond_2

    .line 4
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->g:Ljava/util/Stack;

    invoke-virtual {v0}, Ljava/util/Stack;->pop()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Les/c9$a$a;

    .line 5
    iget v2, v0, Les/c9$a;->a:I

    sget v3, Les/c9$a;->t:I

    if-ne v2, v3, :cond_1

    .line 6
    invoke-direct {p0, v0}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->a(Les/c9$a$a;)V

    .line 7
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->g:Ljava/util/Stack;

    invoke-virtual {v0}, Ljava/util/Stack;->clear()V

    .line 8
    iput v1, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->a:I

    goto :goto_0

    .line 9
    :cond_1
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->g:Ljava/util/Stack;

    invoke-virtual {v1}, Ljava/util/Stack;->isEmpty()Z

    move-result v1

    if-nez v1, :cond_0

    .line 10
    iget-object v1, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->g:Ljava/util/Stack;

    invoke-virtual {v1}, Ljava/util/Stack;->peek()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Les/c9$a$a;

    invoke-virtual {v1, v0}, Les/c9$a$a;->a(Les/c9$a$a;)V

    goto :goto_0

    .line 11
    :cond_2
    iget p1, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->a:I

    if-eq p1, v1, :cond_3

    .line 12
    invoke-direct {p0}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->b()V

    :cond_3
    return-void
.end method

.method private static b(I)Z
    .locals 1

    .line 13
    sget v0, Les/c9$a;->t:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->v:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->w:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->x:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->y:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->D:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->Y:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->Z:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->a0:I

    if-ne p0, v0, :cond_0

    goto :goto_0

    :cond_0
    const/4 p0, 0x0

    goto :goto_1

    :cond_1
    :goto_0
    const/4 p0, 0x1

    :goto_1
    return p0
.end method

.method private c()Z
    .locals 7
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser$ParserException;
        }
    .end annotation

    .line 1
    iget v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->d:I

    const/16 v1, 0x8

    const/4 v2, 0x0

    if-nez v0, :cond_1

    .line 2
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->e:Les/e9;

    iget-object v0, v0, Les/e9;->a:[B

    invoke-direct {p0, v0, v2, v1}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->a([BII)Z

    move-result v0

    if-nez v0, :cond_0

    return v2

    .line 3
    :cond_0
    iput v1, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->d:I

    .line 4
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->e:Les/e9;

    invoke-virtual {v0, v2}, Les/e9;->b(I)V

    .line 5
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->e:Les/e9;

    invoke-virtual {v0}, Les/e9;->h()J

    move-result-wide v3

    iput-wide v3, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->c:J

    .line 6
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->e:Les/e9;

    invoke-virtual {v0}, Les/e9;->c()I

    move-result v0

    iput v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->b:I

    .line 7
    :cond_1
    iget-wide v3, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->c:J

    const-wide/16 v5, 0x1

    cmp-long v0, v3, v5

    if-nez v0, :cond_2

    .line 8
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->e:Les/e9;

    iget-object v0, v0, Les/e9;->a:[B

    invoke-direct {p0, v0, v1, v1}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->a([BII)Z

    .line 9
    iget v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->d:I

    add-int/2addr v0, v1

    iput v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->d:I

    .line 10
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->e:Les/e9;

    invoke-virtual {v0}, Les/e9;->j()J

    move-result-wide v3

    iput-wide v3, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->c:J

    .line 11
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->l:Ljava/lang/StringBuilder;

    if-eqz v0, :cond_2

    const-string v3, "64bit_"

    .line 12
    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 13
    :cond_2
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->l:Ljava/lang/StringBuilder;

    if-eqz v0, :cond_3

    .line 14
    iget v3, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->b:I

    invoke-static {v3}, Les/c9$a;->a(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v3, "_"

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 15
    :cond_3
    iget v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->b:I

    invoke-static {v0}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->b(I)Z

    move-result v0

    if-eqz v0, :cond_5

    .line 16
    iget-wide v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->i:J

    iget-wide v2, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->c:J

    add-long/2addr v0, v2

    iget v2, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->d:I

    int-to-long v2, v2

    sub-long/2addr v0, v2

    .line 17
    iget-object v2, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->g:Ljava/util/Stack;

    new-instance v3, Les/c9$a$a;

    iget v4, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->b:I

    invoke-direct {v3, v4, v0, v1}, Les/c9$a$a;-><init>(IJ)V

    invoke-virtual {v2, v3}, Ljava/util/Stack;->add(Ljava/lang/Object;)Z

    .line 18
    iget-wide v2, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->c:J

    iget v4, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->d:I

    int-to-long v4, v4

    cmp-long v6, v2, v4

    if-nez v6, :cond_4

    .line 19
    invoke-direct {p0, v0, v1}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->b(J)V

    goto :goto_0

    .line 20
    :cond_4
    invoke-direct {p0}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->b()V

    goto :goto_0

    .line 21
    :cond_5
    iget v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->b:I

    invoke-static {v0}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->c(I)Z

    move-result v0

    const/4 v3, 0x2

    if-eqz v0, :cond_6

    .line 22
    new-instance v0, Les/e9;

    iget-wide v4, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->c:J

    long-to-int v5, v4

    invoke-direct {v0, v5}, Les/e9;-><init>(I)V

    iput-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->f:Les/e9;

    .line 23
    iget-object v4, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->e:Les/e9;

    iget-object v4, v4, Les/e9;->a:[B

    iget-object v0, v0, Les/e9;->a:[B

    invoke-static {v4, v2, v0, v2, v1}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 24
    iput v3, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->a:I

    goto :goto_0

    :cond_6
    const/4 v0, 0x0

    .line 25
    iput-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->f:Les/e9;

    .line 26
    iput v3, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->a:I

    :goto_0
    const/4 v0, 0x1

    return v0
.end method

.method private static c(I)Z
    .locals 1

    .line 30
    sget v0, Les/c9$a;->F:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->u:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->G:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->H:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->M:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->N:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->O:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->E:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->P:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->Q:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->R:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->S:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->C:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->b:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->b0:I

    if-eq p0, v0, :cond_1

    sget v0, Les/c9$a;->c0:I

    if-ne p0, v0, :cond_0

    goto :goto_0

    :cond_0
    const/4 p0, 0x0

    goto :goto_1

    :cond_1
    :goto_0
    const/4 p0, 0x1

    :goto_1
    return p0
.end method

.method private c(J)Z
    .locals 3

    const-wide/16 v0, 0x0

    cmp-long v2, p1, v0

    if-lez v2, :cond_0

    .line 27
    :try_start_0
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->h:Ljava/io/InputStream;

    invoke-virtual {v0, p1, p2}, Ljava/io/InputStream;->skip(J)J

    move-result-wide p1

    .line 28
    invoke-direct {p0, p1, p2}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->a(J)V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    .line 29
    invoke-virtual {p1}, Ljava/io/IOException;->printStackTrace()V

    const/4 p1, 0x0

    return p1

    :cond_0
    :goto_0
    const/4 p1, 0x1

    return p1
.end method

.method private d()V
    .locals 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser$ParserException;
        }
    .end annotation

    .line 1
    iget-wide v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->c:J

    iget v2, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->d:I

    int-to-long v3, v2

    sub-long/2addr v0, v3

    .line 2
    iget-wide v3, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->i:J

    add-long/2addr v3, v0

    .line 3
    iget-object v5, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->f:Les/e9;

    if-eqz v5, :cond_2

    .line 4
    iget-object v5, v5, Les/e9;->a:[B

    long-to-int v1, v0

    invoke-direct {p0, v5, v2, v1}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->a([BII)Z

    .line 5
    iget v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->b:I

    sget v1, Les/c9$a;->b:I

    if-ne v0, v1, :cond_1

    .line 6
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->f:Les/e9;

    invoke-direct {p0, v0}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->a(Les/e9;)Z

    move-result v0

    if-eqz v0, :cond_0

    goto :goto_0

    .line 7
    :cond_0
    new-instance v0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser$ParserException;

    const-string v1, "Not a valid mp4 file."

    invoke-direct {v0, v1}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser$ParserException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 8
    :cond_1
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->g:Ljava/util/Stack;

    invoke-virtual {v0}, Ljava/util/Stack;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_3

    .line 9
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->g:Ljava/util/Stack;

    invoke-virtual {v0}, Ljava/util/Stack;->peek()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Les/c9$a$a;

    new-instance v1, Les/c9$a$b;

    iget v2, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->b:I

    iget-object v5, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->f:Les/e9;

    invoke-direct {v1, v2, v5}, Les/c9$a$b;-><init>(ILes/e9;)V

    invoke-virtual {v0, v1}, Les/c9$a$a;->a(Les/c9$a$b;)V

    goto :goto_0

    .line 10
    :cond_2
    invoke-direct {p0, v0, v1}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->c(J)Z

    .line 11
    :cond_3
    :goto_0
    invoke-direct {p0, v3, v4}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->b(J)V

    return-void
.end method

.method private e()V
    .locals 1

    .line 1
    invoke-direct {p0}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->f()V

    .line 2
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->g:Ljava/util/Stack;

    invoke-virtual {v0}, Ljava/util/Stack;->clear()V

    return-void
.end method

.method private f()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->h:Ljava/io/InputStream;

    if-eqz v0, :cond_0

    .line 2
    :try_start_0
    invoke-virtual {v0}, Ljava/io/InputStream;->close()V

    const/4 v0, 0x0

    .line 3
    iput-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->h:Ljava/io/InputStream;
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    .line 4
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    :cond_0
    :goto_0
    return-void
.end method

.method private g()V
    .locals 5
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser$ParserException;
        }
    .end annotation

    .line 1
    :try_start_0
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->e:Les/e9;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Les/e9;->b(I)V

    .line 2
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->g:Ljava/util/Stack;

    invoke-virtual {v0}, Ljava/util/Stack;->clear()V

    .line 3
    invoke-direct {p0}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->b()V

    const/4 v0, 0x1

    const/4 v2, 0x1

    :cond_0
    :goto_0
    if-eqz v2, :cond_3

    .line 4
    iget v3, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->a:I

    if-eq v3, v0, :cond_2

    const/4 v4, 0x2

    if-eq v3, v4, :cond_1

    :goto_1
    const/4 v2, 0x0

    goto :goto_0

    .line 5
    :cond_1
    invoke-direct {p0}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->d()V

    goto :goto_0

    .line 6
    :cond_2
    invoke-direct {p0}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->c()Z

    move-result v3
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-nez v3, :cond_0

    goto :goto_1

    .line 7
    :cond_3
    invoke-direct {p0}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->e()V

    return-void

    :catchall_0
    move-exception v0

    goto :goto_2

    :catch_0
    move-exception v0

    .line 8
    :try_start_1
    new-instance v1, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser$ParserException;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Parse mp4 file error when parsing atom "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v3, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->b:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v3, " "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v3, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->b:I

    .line 9
    invoke-static {v3}, Les/c9$a;->a(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2, v0}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser$ParserException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V

    throw v1
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 10
    :goto_2
    invoke-direct {p0}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->e()V

    .line 11
    goto :goto_4

    :goto_3
    throw v0

    :goto_4
    goto :goto_3
.end method


# virtual methods
.method public a()Les/f9;
    .locals 6

    .line 8
    iget-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->j:[Les/f9;

    if-eqz v0, :cond_1

    .line 9
    array-length v1, v0

    const/4 v2, 0x0

    :goto_0
    if-ge v2, v1, :cond_1

    aget-object v3, v0, v2

    .line 10
    iget v4, v3, Les/f9;->a:I

    sget v5, Les/f9;->i:I

    if-ne v4, v5, :cond_0

    return-object v3

    :cond_0
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_1
    const/4 v0, 0x0

    return-object v0
.end method

.method public declared-synchronized a(Ljava/io/FileDescriptor;)V
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser$ParserException;
        }
    .end annotation

    monitor-enter p0

    .line 1
    :try_start_0
    new-instance v0, Ljava/io/FileInputStream;

    invoke-direct {v0, p1}, Ljava/io/FileInputStream;-><init>(Ljava/io/FileDescriptor;)V

    iput-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->h:Ljava/io/InputStream;

    .line 2
    invoke-direct {p0}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->g()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 3
    monitor-exit p0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit p0

    throw p1
.end method

.method public declared-synchronized a(Ljava/lang/String;)V
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser$ParserException;
        }
    .end annotation

    monitor-enter p0

    .line 4
    :try_start_0
    new-instance v0, Ljava/io/FileInputStream;

    invoke-direct {v0, p1}, Ljava/io/FileInputStream;-><init>(Ljava/lang/String;)V

    iput-object v0, p0, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->h:Ljava/io/InputStream;

    .line 5
    invoke-direct {p0}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser;->g()V
    :try_end_0
    .catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 6
    monitor-exit p0

    return-void

    :catchall_0
    move-exception p1

    goto :goto_0

    :catch_0
    move-exception v0

    .line 7
    :try_start_1
    new-instance v1, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser$ParserException;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "File "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p1, " not found."

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-direct {v1, p1, v0}, Lcom/esfile/screen/recorder/media/mp4parser/MP4Parser$ParserException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V

    throw v1
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    :goto_0
    monitor-exit p0

    throw p1
.end method
